﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="reginfo_list.aspx.cs" Inherits="admin_vico_reginfo_list" %>


<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title>Lomboz aspx</title>
<meta http-equiv="Cache-Control" content="no-store, must-revalidate" />
<meta http-equiv="Pragma"        content="no-cache" />
<meta http-equiv="Expires"       content="0" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script src="../js/jUtility.js" type="text/javascript"></script>
<script type="text/javascript" src="../common/calendar.js"></script>
<script type="text/javascript"> 
function deldata(){
  	var s;
	var url;
	s = '该操作不能恢复,是否确认?'; 
	
	if(!isChecked(pageform.ids)){
		alert("请选择要删除的信息!");
		return false;
	}
	if (confirm(s)) {
	    return onhtml();
    }
    return false;
}

function searchdata(){
    pageform.submit();
    return false;
}

</script>
</head>

<body>
<form id="pageform" runat="server" method="post">
<asp:HiddenField ID="camname2" runat="server" />
<table width="100%" height="600" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="_listpage">
  <tr>
    <td height="414" align="left" valign="top" class="rightbg">
	<table width="100%" height="489" border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td height="26"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td height="2" bgcolor="#A49B81"></td>
	</tr>
	<tr>
	<td height="22" background="../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav" style="background-repeat:repeat-y; background-position:left; padding-left:6px; ">
	<asp:Label ID="headers" runat="server" />
	
	</td>
	</tr>
	<tr>
	<td height="1" bgcolor="#B0C9E8"></td>
	</tr>
	</table></td>
	</tr>
	<tr>
	<td height="16"></td>
	</tr>
	<tr>
	<td height="21">
	<table border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td width="25">&nbsp;</td>
	
	<td width="100" align="left" runat="server" id="deltd">
			<table width="80" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="3"><img src="../images/btn_blue_left.gif" width="3" height="21" /></td>
                    <td width="26" align="center" background="../images/btn_blue_center.jpg"><img src="../images/icon_delete.gif" width="15" height="15" /></td>
                    <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                    <asp:LinkButton runat="server" ID="del" OnClick="Del_click" OnClientClick="return deldata();">删 除</asp:LinkButton>
                    </td>
                    <td width="3"><img src="../images/btn_blue_right.jpg" width="3" height="21" /></td>
                  </tr>
              </table>
	</td>
	
	</tr>
	</table>        
	</td>
	</tr>
	<tr>
	<td height="16"></td>
	</tr>
	
	<tr>
	<td align="left" valign="top" style="padding-left:10px;"><table width="95%" height="74" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#2583BC" bordercolordark="#ffffff" bgcolor="#B3CFEC">
	<tr>
	<td width="100%" valign="top"><table width="95%" height="75" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td height="29" align="center" valign="middle"><table width="98%" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0D8EF">
	<tr>
	<td align="center" valign="middle"><table width="98%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td height="20"  valign="bottom">
	每页显示数：　
	<asp:DropDownList ID="rows" runat="server" >
	    <asp:ListItem Text="10" Value="10" />
	    <asp:ListItem Text="15" Value="15" />
	    <asp:ListItem Text="20" Value="20" />
	    <asp:ListItem Text="50" Value="50" />
	    <asp:ListItem Text="1000" Value="1000" />
	</asp:DropDownList>
	
	&nbsp;&nbsp;姓名：		
	<asp:TextBox ID="username" runat="server" />
	&nbsp;&nbsp;手机：
	<asp:TextBox ID="moblie" runat="server" />

	
	&nbsp;&nbsp;接收信息：
	<asp:DropDownList runat="server" ID="incept" >
	    <asp:ListItem Value="0" Text="全部" />
	    <asp:ListItem Value="1" Text="是" />
	    <asp:ListItem Value="2" Text="否" />
	</asp:DropDownList>
	</tr>
	<tr>
	<td height="23"  valign="bottom">
	经销商信息 &nbsp;&nbsp;
	省份：
	<select id="dealerprovince" name="dealerprovince" onchange="setCity(this.value,'dealercity');">
        <option value="">请选择</option>
        <%=dealerpstr%>
        </select>
	
	&nbsp;&nbsp;城市：
	<select id="dealercity" name="dealercity" onchange="setDealer(this.value);"><option value="">请选择</option></select> 
    &nbsp;&nbsp;经销商：
	<select id="dealer" name="dealer"><option value="">请选择                  </option></select>
	&nbsp;&nbsp;Arvato返回状态：
	<asp:TextBox ID="tbxStatus" runat="server" />
	
	<br />
	&nbsp;&nbsp;开始日期：
	<asp:TextBox ID="startdate" runat="server" onClick="fPopCalendar(startdate,startdate);return false"
                                                        onkeydown="return false;"/>
	&nbsp;&nbsp;结束日期：
	<asp:TextBox ID="enddate" runat="server" onClick="fPopCalendar(enddate,enddate);return false"
                                                        onkeydown="return false;"/>
	
	<input type="button" onClick="javascript:searchdata();" name="Submit" value="搜索" />
	<asp:Button ID="imp" Text="导出" runat="server" OnClick="Imp_click" /></td>
	</tr>
	</table></td>
	</tr>
	</table></td>
	</tr>
	</table></td>
	</tr>
	</table></td>
	</tr>      
	
	<tr>
	<td height="16"></td>
	</tr>
	<tr>
	
	<td height="310" align="center" valign="top" style="padding-left:10px;"><table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#2583BC" bordercolordark="#ffffff">
	<tr>
	<td width="100%" height="300" valign="top">
	
	<asp:GridView ID="GridView1" runat="server" Width="100%" border="0" CellPadding="0" CellSpacing="0"
	ShowFooter="false"  AllowPaging="True" AutoGenerateColumns="False" >
	<Columns>
	    <asp:TemplateField HeaderText="全选">
	        <HeaderTemplate>
                全选
                <input name="all" type="checkbox" onclick="selectall('ids');" />
            </HeaderTemplate>
	        <ItemTemplate>
                  <input type="checkbox" value="<%# DataBinder.Eval(Container.DataItem, "ID") %>" name="ids" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
            <ItemStyle CssClass="greytd" />
	    </asp:TemplateField>
	    <asp:BoundField  HeaderText="ID" DataField="ID" ItemStyle-CssClass="greytd"/>
	    <asp:BoundField DataField="USER_NAME" HeaderText="姓名" ItemStyle-CssClass="greytd"/>
	    <asp:BoundField DataField="MOBILE" HeaderText="手机" ItemStyle-CssClass="greytd" />
	    <asp:BoundField DataField="EMAIL" HeaderText="EMAIL" ItemStyle-CssClass="greytd" />
        <asp:BoundField DataField="SOUREC" HeaderText="来源" ItemStyle-CssClass="greytd" />    
	    <asp:BoundField DataField="CHANNEL" HeaderText="渠道" ItemStyle-CssClass="greytd" /> 
	    <asp:TemplateField HeaderText="创建时间" >
	        <HeaderTemplate>创建时间</HeaderTemplate>
	        <ItemTemplate>
	        <%#((DateTime)Eval("ADDTIME")).ToString("yyyy/MM/dd HH:mm:ss")%>
	        </ItemTemplate>
	        <ItemStyle HorizontalAlign="Center" />
            <ItemStyle CssClass="greytd" />
	    </asp:TemplateField>
	     <asp:BoundField DataField="vico_receive_ccc_time" HeaderText="响应时间" ItemStyle-CssClass="greytd" /> 
	     <asp:BoundField DataField="vico_send_ccc_resultCode" HeaderText="状态码" ItemStyle-CssClass="greytd" /> 
	     <asp:BoundField DataField="vico_send_ccc_resultDesc" HeaderText="状态描述" ItemStyle-CssClass="greytd" /> 
	     <asp:BoundField DataField="vico_send_ccc_resultDetail" HeaderText="详细信息" ItemStyle-CssClass="greytd" /> 
	    <asp:TemplateField HeaderText="管理">
	        <HeaderTemplate>
                管理
            </HeaderTemplate>
	        <ItemTemplate>
	             <a href="reginfo_detail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID") %>&layerid=<%=Request.Params["layerid"]%>">查看</a>
                 
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
            <ItemStyle CssClass="greytd" />
	    </asp:TemplateField>
	</Columns>
	<PagerTemplate>
	
	</PagerTemplate>
	
	</asp:GridView>
	
	</td>
	</tr>
	</table>
	   </td>
	</tr>  
	</table>
	    
	    <!--分页开始-->
	   <asp:Label ID="pagehtml" runat="server" />
		<!--分页结束-->  
</td>
</tr>  
    
</table>	
</form>
<iframe id="wait2" name="wait2" style="display:none;" width=100% height="600" src="../images/wait.gif" FRAMEBORDER='0' align='middle' bgcolor='#FFFFFF'></iframe>
<script type="text/javascript">

    function onhtml() {
        document.all.wait2.style.display = "inline";
        document.all._listpage.style.display = "none";
        return true;
    }
    <%=dealercstr %>
    <%=dealerstr %>
    function setProvice(pid) {
        document.getElementById(pid).options.length = 0;
        var option = document.createElement("OPTION");
        option.text = "请选择";
        option.value = "";
        document.getElementById(pid).options.add(option);
        var exitis = "";
        for (var i = 0; i < pcd.length; i++) {
            var city = pcd[i];

            if (exitis.indexOf(city[0] + ",") < 0) { //去重
                option = document.createElement("OPTION");
                option.text = city[0];
                option.value = city[0];
                document.getElementById(pid).options.add(option);
                exitis += city[0] + ",";
            }

        }
    }

    function setCity(pname, cid) {
        initDealer();

        document.getElementById(cid).options.length = 0;
        var option = document.createElement("OPTION");
        option.text = "请选择";
        option.value = "";
        document.getElementById(cid).options.add(option);
        var pcd = dcitys[pname];
        for (var i = 0; i < pcd.length; i++) {
            var city = pcd[i];
            //if (city[0] == pname) {
            //if (exitis.indexOf(city[1] + ",") < 0) {
            option = document.createElement("OPTION");
            option.text = city[1];
            option.value = city[0];
            document.getElementById(cid).options.add(option);
            //exitis += city[1] + ",";
            // }
            // }
        }
    }

    function setDealer(cname) {
        //var pname = document.getElementById("dealerprovince").value;
        initDealer();
        var pcd = dealers[cname];
        for (var i = 0; i < pcd.length; i++) {
            var city = pcd[i];
            //if (city[0] == pname && city[1] == cname) {
            option = document.createElement("OPTION");
            option.text = city[1];
            option.value = city[0];
                        
            document.getElementById("dealer").options.add(option);
            //}
        }
    }
    function initDealer() {
        document.getElementById("dealer").options.length = 0;
        var option = document.createElement("OPTION");
        option.text = "请选择               ";
        option.value = "";
        document.getElementById("dealer").options.add(option);
    }
    <%if(Dealer_provice!=null && Dealer_provice!=""){ %>
        document.getElementById("dealerprovince").value = '<%=Dealer_provice %>';
        setCity('<%=Dealer_provice %>','dealercity');
        document.getElementById("dealercity").value = '<%=Dealer_city %>';
        if('<%=Dealer_city %>'!=""){
            setDealer('<%=Dealer_city %>');
        }
        document.getElementById("dealer").value = '<%=Dealer %>';
    <%}%>
</script>
</body>
</html>